package com.liuhongwei.test.builder.strategy.impl;

import com.liuhongwei.test.bean.TableInfo;
import com.liuhongwei.test.builder.strategy.inf.MapperXmlStrategy;

import java.io.BufferedWriter;
import java.io.IOException;

/**
 * 单条插入
 */
public class XmlFieldInsertOrUpdateImpl implements MapperXmlStrategy {

    @Override
    public void generateMapperXml(TableInfo tableInfo, BufferedWriter bw) throws IOException {

        bw.write("\t<!--插入或者更新（匹配有值的字段）-->\n");
        CommonXmlImpl.commonXml(tableInfo, bw, CommonXmlImpl.NAME_INSERT_OR_UPDATE, null);
    }
}
